Skip to content

Add TTL to getRelayConfiguration.#20692

Merged
AriZavala2 merged 13 commits intoAzure:mainfrom
AriZavala2:AriZavala2/add_ttl
Mar 10, 2022
Merged

Add TTL to getRelayConfiguration.#20692
AriZavala2 merged 13 commits intoAzure:mainfrom
AriZavala2:AriZavala2/add_ttl

Conversation

@AriZavala2
Copy link
Copy Markdown
Contributor

Packages impacted by this PR

  • NetworkTraversal

Issues associated with this PR

None

Describe the problem that is addressed by this PR

  • Adding Ttl parameter for credential

Are there test cases added in this PR? (If not, why?)

Yes

Provide a list of related PRs (if any)

None

Command used to generate this PR:**(Applicable only to SDK release request PRs)

Checklists

  • Added impacted package name to the issue description
  • [] Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
  • Added a changelog (if necessary)

@AriZavala2 AriZavala2 requested a review from ajpeacock0 March 7, 2022 19:16
@azure-sdk
Copy link
Copy Markdown
Collaborator

API changes have been detected in @azure/communication-network-traversal. You can review API changes here

API changes

-     getRelayConfiguration(user: CommunicationUserIdentifier, routeType?: RouteType, options?: GetRelayConfigurationOptions): Promise<CommunicationRelayConfiguration>;
+     getRelayConfiguration(ttl: number, options?: GetRelayConfigurationOptions): Promise<CommunicationRelayConfiguration>;
+     getRelayConfiguration(routeType: RouteType, ttl?: number, options?: GetRelayConfigurationOptions): Promise<CommunicationRelayConfiguration>;
+     getRelayConfiguration(user: CommunicationUserIdentifier, routeType?: RouteType, ttl?: number, options?: GetRelayConfigurationOptions): Promise<CommunicationRelayConfiguration>;
+     getRelayConfiguration(user: CommunicationUserIdentifier, ttl?: number, options?: GetRelayConfigurationOptions): Promise<CommunicationRelayConfiguration>;

Copy link
Copy Markdown
Member

@DominikMe DominikMe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool feature, let's work on the API shape with optional args.

Comment thread sdk/communication/communication-network-traversal/src/communicationRelayClient.ts Outdated
@check-enforcer
Copy link
Copy Markdown

check-enforcer bot commented Mar 9, 2022

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them, in order to bootstrap pipelines for a new service, you can issue the following command as a pull request comment:
/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run js - [service] - ci

@azure-sdk
Copy link
Copy Markdown
Collaborator

API changes have been detected in @azure/communication-network-traversal. You can review API changes here

API changes

-     getRelayConfiguration(routeType: RouteType, options?: GetRelayConfigurationOptions): Promise<CommunicationRelayConfiguration>;
-     getRelayConfiguration(user: CommunicationUserIdentifier, routeType?: RouteType, options?: GetRelayConfigurationOptions): Promise<CommunicationRelayConfiguration>;
- export interface GetRelayConfigurationOptions extends OperationOptions { }
+ export interface GetRelayConfigurationOptions extends OperationOptions {
+     id?: string;
+     routeType?: RouteType;
+     ttl?: number;
+ }

Comment thread sdk/communication/communication-network-traversal/CHANGELOG.md
Copy link
Copy Markdown
Member

@DominikMe DominikMe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm with comments!
+1 to Jose's comment about calling out the breaking change in the Changelog

Comment thread sdk/communication/communication-sms/CHANGELOG.md
Comment thread sdk/communication/communication-network-traversal/src/models.ts Outdated
Comment thread sdk/communication/communication-network-traversal/src/constants.ts Outdated
Copy link
Copy Markdown
Member

@joheredi joheredi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, left a couple of comments. Please address them before merging

@AriZavala2 AriZavala2 enabled auto-merge (squash) March 10, 2022 23:03
@AriZavala2 AriZavala2 merged commit 014e94a into Azure:main Mar 10, 2022
WeiJun428 pushed a commit to WeiJun428/azure-sdk-for-js that referenced this pull request Mar 20, 2022
* Add new version of NetworkTraversal, 2022-03-01-preview, with new parameter TTL

* Add missing await in README

* Update format

* Add review API

* Add correct version in Changelog

* Add options bag for parameters when calling GetRelayConfiguration

* Fix format

* Update release date

* Add missing entry in sms Changelog to fix build errors

* Update PR addressing comments

* Fix comment

* Update PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants